package test;

public class SerialCalculater {

    public static int calculatePrime(int n) {
        int count = 0;
        label: for (int i=2; i<=n; i++) {
            for (int j=2; j<=Math.sqrt(i); j++) {
                if (i % j == 0) {
                    continue label;
                }
            }
            count++;
        }
        return count;
    }
}
